﻿using System;
using System.Windows;
using PureMVC.Interfaces;
using GameEngine.Model.Data;

namespace GameEngine.Model
{
    public class IViewDataProxyConstants<IdType>
        where IdType : IComparable<IdType>
    {
        public const string THINGTYPECVIEWHANGED_NOTIFICATION = "ViewDataProxyChanged";
        public static string CreateDataProxyName(IViewVOId<IdType> id)
        {
            return id.Value + "_viewDataProxy";
        }

        public static string CreateDataProxyName(IViewVO<IdType> vo)
        {
            return CreateDataProxyName(vo.Id);
        }
    }
    public interface IViewDataProxy<IdType> : IDataProxy
        where IdType : IComparable<IdType>
    {
        string Name { get; }

        IViewVOId<IdType> Id { get; }

        IViewVO<IdType> VO { get; }

        void AddShape(IShapeVO shape);
        void AddShape(IShapeVO shape, ViewStateVO state);

        void RemoveShape(IShapeVOId shapeId);
        void RemoveShape(IShapeVOId shapeId, ViewStateVO state);

        void UpdateShape(IShapeVOId shapeId, string value);
        void UpdateShape(IShapeVOId shapeId, string value, ViewStateVO state);

        //IThingTypeDataProxy<ItemVOId> Replicate();
    }    
}